<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="author" content="lz">
    <script src="../jQuery/jquery-3.1.1.js"></script>
    <title></title>
    <style>
        * {
            box-sizing: border-box;
        }
        
        main {
            width: 595px;
            /*background-color: saddlebrown;*/
            border: 1px solid #ebebeb;
            overflow: hidden;

        }
        
        .nav {
            width: 100%;
            height: 35px;
            background-image: url(img/btn_cartoon.gif);
            position: relative;
        }
        
        .left {
            position: absolute;
            left: 0;
            /*background-color: salmon;*/
            overflow: hidden;
        }
        
        .left>span {
            display: inline-block;
            width: 85px;
            height: 35px;
            margin: 0;
        }
        
        .icon {
            background-image: url(img/btn_cartoon.gif);
            background-size: 600px 552px;
        }
        
        .i1 {
            background-position: 0 -104px;
        }
        
        .left>span>span {
            float: left;
            width: 8px;
            height: 8px;
            /*background-color: gray;*/
            position: relative;
            top: 11px;
            margin: 3px;
            padding: 0;
        }
        
        .i2 {
            background-position: 0 0;
        }
        
        .icon1 {
            background-color: #fff;
            border-radius: 50%;
        }
        
        .blue {
            background-color: #04aef4;
        }
        
        .i3 {
            background-position: 0 -415px;
            position: relative;
            right: 20px;
        }
        
        .qian {
            width: 27px;
            height: 20px;
            background-color: black;
            position: relative;
            top: 8px;
            left: 3px;
            opacity: 0;
        }
        
        .qian:hover,
        .hou:hover {
            cursor: pointer;
            opacity: 0.3;
        }
        
        .hou {
            width: 27px;
            height: 20px;
            background-color: black;
            position: relative;
            bottom: 12px;
            left: 31px;
            opacity: 0;
        }
        
        .gd {
            width: 50px;
            height: 35px;
            float: right;
            color: #2b9bd7;
            font-weight: bold;
            font-size: 14px;
            line-height: 35px;
            position: relative;
            right: 10px;
        }
        
        section {
            width: 100%;
            height: 160px;
            display: -webkit-flex;
            display: -moz-flex;
            display: -ms-flex;
            display: -o-flex;
            display: flex;
            justify-content: space-around;
            align-items: center;
        }
        
        .k {
            width: 130px;
            height: 130px;
        }
        
        .img {
            width: 130px;
            height: 80px;
        }
        
        .img:hover {
            cursor: pointer;
        }
        
        .img>img {
            width: 100%;
            height: 100%;
        }
        
        .dhm {
            color: #3e93d2;
            /*font-weight: bold;*/
            font-size: 14px;
            margin: 5px 0;
        }
        
        .bfl {
            color: #888888;
            font-size: 14px;
        }
        
        .no {
            display: none;
        }
        .dhk{
            /*background: saddlebrown;*/
            position: relative;
            right: 0;
        }
        .r2{
            position:absolute;
            top: 0;
            left: 100%;
        }
        .r3{
            position: absolute;
            top: 0;
            left: 200%;
        }
        .r4{
            position: absolute;
            top: 0;
            left: 300%;
        }
        .gd:hover{
            cursor: pointer;
            color: orangered;
            text-decoration: underline;
        }
        .dhm:hover{
            color: orangered;
            cursor: pointer;
            text-decoration: underline;
        }
    </style>
</head>

<body>
    <main>
        <div class="nav">
            <div class="left">
                <span class="icon i1"></span>
                <span>
                    <span class="icon1 blue"></span>
                <span class="icon1"></span>
                <span class="icon1"></span>
                <span class="icon1"></span>
                </span>
                <span class="icon i3">
                    <div class="qian"></div>
                    <div class="hou"></div>
                </span>
            </div>
            <span class="gd">更多>></span>
        </div>
        <div class="dhk">
            <section class="">
                <div class="k">
                    <div class="img"><img src="img/01.jpg"></div>
                    <div class="dhm">海贼王</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/01.jpg"></div>
                    <div class="dhm">海贼王</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/01.jpg"></div>
                    <div class="dhm">海贼王</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/01.jpg"></div>
                    <div class="dhm">海贼王</div>
                    <div class="bfl">播放：258,445</div>
                </div>
            </section>
            <section class="r2">
                <div class="k">
                    <div class="img"><img src="img/02.jpg"></div>
                    <div class="dhm">机器猫</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/02.jpg"></div>
                    <div class="dhm">机器猫</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/02.jpg"></div>
                    <div class="dhm">机器猫</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/02.jpg"></div>
                    <div class="dhm">机器猫</div>
                    <div class="bfl">播放：258,445</div>
                </div>
            </section>
            <section class="r3">
                <div class="k">
                    <div class="img"><img src="img/03.jpg"></div>
                    <div class="dhm">火影忍者</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/03.jpg"></div>
                    <div class="dhm">火影忍者</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/03.jpg"></div>
                    <div class="dhm">火影忍者</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/03.jpg"></div>
                    <div class="dhm">火影忍者</div>
                    <div class="bfl">播放：258,445</div>
                </div>
            </section>
            <section class="r4">
                <div class="k">
                    <div class="img"><img src="img/04.jpg"></div>
                    <div class="dhm">七龙珠</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/04.jpg"></div>
                    <div class="dhm">七龙珠</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/04.jpg"></div>
                    <div class="dhm">七龙珠</div>
                    <div class="bfl">播放：258,445</div>
                </div>
                <div class="k">
                    <div class="img"><img src="img/04.jpg"></div>
                    <div class="dhm">七龙珠</div>
                    <div class="bfl">播放：258,445</div>
                </div>
            </section>
        </div>
    </main>
</body>

</html>
<script>
    var zz = 0;
    $('.hou').click(function () {
        if(zz==3){
            zz=0;
        }else{
            zz++;
        }
        $('.icon1').eq(zz).addClass('blue').siblings().removeClass('blue');
        var left = (595 * zz)*1+'px';
        $('.dhk').stop().animate({
            right:left
        },1000)
    })

    $('.qian').click(function () {
        if(zz==0){
            zz=3;
        }else{
            zz--;
        }
        $('.icon1').eq(zz).addClass('blue').siblings().removeClass('blue');
        var left = (595 * zz)*1+'px';
        $('.dhk').stop().animate({
            right:left
        },1000)
    })
</script>